package cn.aliang.cloud.hystrixorder.service;


import cn.aliang.cloud.service.entity.ResultMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author: chendongliang
 * @Date: 2020/7/21 10:15
 *
 *
 * 使用fallback 类的形式实现服务降级
 *
 *
 */

@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE",fallback = PaymentFallbackService.class)
public interface PaymentFeignHystrixService {

    @GetMapping("/payment/pay/{id}")
    ResultMessage<Void> pay(@PathVariable("id") String id );


    @GetMapping("/payment/payForException/{id}")
    ResultMessage<Void> payForException(@PathVariable("id") String id );

}
